﻿namespace MyFurion.Model
{
    /// <summary>
    /// 组织机构信息
    /// </summary>
    [SugarTable("Sys_Org")]
    [Tenant(0)]
    public class OrgInfo:BaseEntity
    {
        /// <summary>
        /// 父级id
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "父级id")]
        public long? ParentId { get; set; }
        /// <summary>
        /// 机构编码
        /// </summary>
        [SugarColumn(IsNullable =true,ColumnDescription ="机构编码")]
        public string OrgCode { get; set; }
        /// <summary>
        /// 机构名称
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "机构名称")]
        public string OrgName { get; set; }
        /// <summary>
        /// 停用启用状态
        /// </summary>
        [SugarColumn(ColumnDescription = "停用启用状态：0停用 1启用", DefaultValue ="1")]
        public EnumStatus Status { get; set; }
        /// <summary>
        /// 子节点
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<OrgInfo> Children { get; set; } = new();
        /// <summary>
        ///角色是否有该菜单权限
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public bool IsRolePer { get; set; } = false;
    }
}
